<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/order/dictionary/tb_dictionary.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/order/dictionary/tb_dictionary.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'guid_Id',
                footer: "Foots",
                cnName: '1.字典表',
                name: 'dictionary/tb_dictionary',
                url: "/tb_dictionary/",
                sortName: "createDate"
            });
            const editFormFields = ref({"dbSql":"","dicName":""});
            const editFormOptions = ref([[{"title":"sql语句","field":"dbSql"},
                               {"title":"字典名称","required":true,"field":"dicName"}]]);
            const searchFormFields = ref({"dicName":""});
            const searchFormOptions = ref([[{"title":"字典名称","field":"dicName","type":"textarea"}]]);
            const columns = ref([{field:'dic_Id',title:'字典ID',type:'string',width:120,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'config',title:'配置项',type:'string',width:220,align:'left',sort:true},
                       {field:'createDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'createID',title:'创建人ID',type:'string',width:100,hidden:true,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:100,align:'left'},
                       {field:'dbServer',title:'DBServer',type:'string',width:220,align:'left'},
                       {field:'dbSql',title:'sql语句',type:'string',width:220,align:'left'},
                       {field:'dicName',title:'字典名称',type:'string',link:true,width:120,require:true,align:'left'},
                       {field:'dicNo',title:'字典编号',type:'string',width:120,require:true,align:'left'},
                       {field:'enable',title:'是否启用',type:'sbyte',width:110,require:true,align:'left'},
                       {field:'modifier',title:'修改人',type:'string',width:100,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'modifyId',title:'修改人ID',type:'string',width:100,hidden:true,align:'left'},
                       {field:'orderNo',title:'排序号',type:'int',width:110,align:'left'},
                       {field:'parentId',title:'父级ID',type:'string',width:120,require:true,align:'left'},
                       {field:'remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'guid_Id',title:'Guid (暂定)',type:'int',width:120,hidden:true,readonly:true,require:true,align:'left'}]);
            const detail = ref({
                cnName: "2.字典明细表",
                table: "tb_dictionarylist",
                columns: [{field:'dicList_Id',title:'字典明细表ID',type:'string',width:120,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'createId',title:'创建人ID',type:'string',width:100,hidden:true,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:100,align:'left'},
                       {field:'dicName',title:'数据源Text',type:'string',width:120,require:true,align:'left'},
                       {field:'dicValue',title:'数据源Value',type:'string',width:120,require:true,align:'left'},
                       {field:'dic_Id',title:'数据源ID',type:'string',width:120,require:true,align:'left'},
                       {field:'enable',title:'是否可用',type:'sbyte',width:110,require:true,align:'left'},
                       {field:'modifier',title:'修改人',type:'string',width:100,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'modifyId',title:'修改人ID',type:'string',width:100,hidden:true,align:'left'},
                       {field:'orderNo',title:'排序号',type:'int',width:110,align:'left'},
                       {field:'remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'guid_Id',title:'Guid (暂定)',type:'int',width:120,hidden:true,readonly:true,require:true,align:'left'}],
                sortName: "createDate",
                key: "guid_Id"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
